<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="__CSS__/ex/common.css">
    <link rel="stylesheet" href="__CSS__/ex/login.css">
    <title>超级VIP申请</title>
    <script src="__JS__/ios-web-app.js"></script>
    <style>

        .change_content{
            background: #fff;
        }
    </style>
</head>

<body style="padding-top: 38px">
<header class="normal_header"  style="background: #fff;display: flex;justify-content: space-between">
    <div class="">
        <a href="javascript:history.go(-1)" style="display: flex;align-items: center">
            <img src="__IMG__/ex/back_black.png" alt="" style="width: .2rem;padding-right: .1rem">
            <span style="color: #000;font-size: .32rem">VIP用户</span>
        </a>
    </div>
    <p style="color: #000;">1000000 SWEET</p>
    <img src="__IMG__/ex/shenglue.png" alt="" width="25rem">
</header>
<!--<header class="normal_header"  style="background: #EC1C24;">-->
<!--    <div class="header_pic">-->
<!--        &lt;!&ndash;<a href="{:U('Discover/index')}"><img src="__IMG__/ex/back.png" alt=""></a>&ndash;&gt;-->
<!--        <a href="{:U('Index/index')}"><img src="__IMG__/ex/back.png" alt=""></a>-->
<!--    </div>-->
<!--    <p style="color: #fff;">VIP用户</p>-->
<!--    <div class="header_pic"></div>-->
<!--</header>-->
<section class="change_content">
<!--    <div class="flex_box_vip">-->
<!--        <img src="__IMG__/ex/head.png" alt="" width="25rem">-->
<!--        &lt;!&ndash;<p  style="font-weight: bold;">&nbsp;&nbsp;{$config['a1']|round=2}&nbsp;SWEET</p>&ndash;&gt;-->
<!--        <p  style="font-weight: bold;">&nbsp;&nbsp;{$data.amount|round=2}&nbsp;SWEET</p>-->
<!--    </div>-->

    <div class="container_box">
        <div style=" height:50px;">
            <!--<div  style=" float:left; height:50px; line-height:50px;">申请账户</div>-->
            <div  style=" float:left; height:50px; line-height:50px;">UID</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <!--<span style="padding:.3rem;">{$data.username}</span>-->
                <span style="padding:.3rem;">{$data.uid}</span>
            </div>

        </div>
    </div>


    <div class="container_box">

        <div class="line1"></div>
        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">赠送 <span style="color: #A9A9A9;font-size: 12px;">&nbsp;(SWEET)</span></div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data.amount|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>
        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">解冻 <span style="color: #A9A9A9;font-size: 12px;">&nbsp;(SWEET)</span></div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data['release_amount']+$data['frozen_sweet']|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>

        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">余额 <span style="color: #A9A9A9;font-size: 12px;">&nbsp;(SWEET)</span></div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data['amount']-$data['release_amount']-$data['frozen_sweet']|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>
    </div>

    <div class="container_box">
        <div style=" height:50px;">
            <!--<div  style=" float:left; height:50px; line-height:50px;">累计业绩</div>-->
            <div  style=" float:left; height:50px; line-height:50px;">累计</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data.leiji_zong|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>
        <div style=" height:50px;">
            <!--<div  style=" float:left; height:50px; line-height:50px;">新增业绩</div>-->
            <div  style=" float:left; height:50px; line-height:50px;">新增</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data.month_zong|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>
    </div>

    <div class="container_box">
        <div style=" height:50px;">
            <!--<div  style=" float:left; height:50px; line-height:50px;">差额(补仓)</div>-->
            <div  style=" float:left; height:50px; line-height:50px;">补仓</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data.less_zong|round=2}</span>
            </div>

        </div>
    </div>


    <div class="container_box">

        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;"><b>SWEET</b> </div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" class="transfer">
                <span style="padding:.3rem;"><b>划转</b> </span>
            </div>
        </div>

        <div class="line1"></div>

        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">资产</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >
                <span style="padding:.3rem;">{$data['new_release_amount']|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>

        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">冻结</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data['new_release_amount']*3/10|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>

        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">可用</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <!--<span style="padding:.3rem;">{$data['new_release_amount']*7/10|round=2}</span>-->
                <span style="padding:.3rem;">{$data['new_release_amount_use']|round=2}</span>
            </div>

        </div>

        <div class="line1"></div>
    </div>


    <div class="container_box cash">
        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">保证金</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <!--<span style="padding:.3rem;">{$data.cash_deposit|round=2}</span>-->
                <span style="padding:.3rem;">增加</span>
            </div>

        </div>
    </div>
    <div class="container_box">
        <div style=" height:50px;">
            <div  style=" float:left; height:50px; line-height:50px;">USDT(冻结)</div>
            <div  style=" float:right;text-align: right; height:50px; line-height:50px;" >

                <span style="padding:.3rem;">{$data.frozen_usdt|round=2}</span>
            </div>

        </div>
    </div>
    <style>
        table{
            font-size: .24rem;
            text-align: center;
        }
        table tr td:first-child{
            width: 2.5rem;
        }
        table tr td{
            vertical-align: middle;
        }
        td{
            border: 1px solid black;
        }
        .change_content{
            overflow-x:hidden ;
        }
    </style>

</section>
<!--<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>-->
<script src="__COMMON__/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="__PUBLIC__/lib/layer/layer.js"></script>
<script>
    // $("#agent_level").change(function () {
    //     if($(this).val()==1){
    //         $(".rengou").text('1万');
    //     }
    //     if($(this).val()==2){
    //         $(".rengou").text('10万');
    //     }
    // })

    $('#sub').click(function () {
        layer.confirm('确认申请VIP吗？',function(){
            $.ajax({
                type: "post",
                // url: "{:U('property/sub_agent')}",
                url: "__ACTION__",
                data: {
                },
                dataType: "json",
                success: function (data) {
                    if (data.code == 1) {
                        // alert(data.message);
                        layer.msg(data.message);return false;
                    } else {

                        // alert(data.message);
                        layer.msg(data.message); return false;
                        window.location.reload();
                    }
                }
            });
        });
        // if(confirm('确认申请VIP吗')){
        //     $.ajax({
        //         type: "post",
        //         // url: "{:U('property/sub_agent')}",
        //         url: "__ACTION__",
        //         data: {
        //         },
        //         dataType: "json",
        //         success: function (data) {
        //             if (data.code == 1) {
        //                 // alert(data.message);
        //                 layer.msg(data.message);
        //             } else {
        //                 // alert(data.message);
        //                 layer.msg(data.message);
        //                 window.location.reload();
        //             }
        //         }
        //     });
        // }

    });

    $('.cash').click(function () {
        // var id = $(this).attr('r_id');
        layer.open({
            id:1,
            type: 1,
            title:'增加保证金',
            skin:'layui-layer-rim',
            area:['250px', 'auto'],
            content: ' <div class="row" style="width: 120px;  margin-left:20px; margin-top:10px;">'
                +'<div class="col-sm-12">'
                +'<div class="input-group">'
                +'<input id="cash" style="border: 1px solid #A9A9A9;font-size: 16px;height: 22px" class="form-control" />'
                +''
                +'</div>'
                +'</div>'
                +'</div>'
            ,
            btn:['提交','取消'],
            btn1: function (index,layero) {
                var cash = $('#cash').val();
                $.post("{:U('add_agent')}",{amount:cash},function (data) {
                    if(data.code>0){
                        layer.msg(data.message,{time:1000});
                        window.location.reload();return false;
                        window.location.href = "{:U('Discover/stock_detail')}";
                        return false;
                    }else{
                        layer.msg(data.message,{time:1000});return false;
                        // window.location.reload();
                    }
                },'json')
            },
            btn2:function (index,layero) {
                layer.close(index);
            }

        });
    });
    $('.transfer').click(function () {
        // var id = $(this).attr('r_id');
        layer.open({
            id:1,
            type: 1,
            title:'划转数量',
            skin:'layui-layer-rim',
            area:['250px', 'auto'],
            content: ' <div class="row" style="width: 120px;  margin-left:20px; margin-top:10px;">'
                +'<div class="col-sm-12">'
                +'<div class="input-group">'
                +'<input id="transfer" style="border: 1px solid #A9A9A9;font-size: 16px;height: 22px" class="form-control" />'
                +''
                +'</div>'
                +'</div>'
                +'</div>'
            ,
            btn:['提交','取消'],
            btn1: function (index,layero) {
                var transfer = $('#transfer').val();
                $.post("{:U('Property/add_transfer')}",{amount:transfer},function (data) {
                    if(data.code>0){
                        layer.msg(data.message,{time:1000});
                        window.location.reload();return false;
                        // window.location.href = "{:U('Discover/stock_detail')}";
                        // return false;
                    }else{
                        layer.msg(data.message,{time:1000});return false;
                        // window.location.reload();
                    }
                },'json')
            },
            btn2:function (index,layero) {
                layer.close(index);
            }

        });
    });
</script>
</body>

</html>